const Axios = require('../utils/request');
const API = '/user';

// 申请试用
const applyMemberServiceOrder = params => {
  return Axios.http({url: API + '/memberServiceOrder/applyMemberServiceOrder', data: params})
}
// 查询登录用户会员服务状态
const getUserServiceState = params => {
  return Axios.http({url: API + '/userServiceOrder/getUserServiceState', data: params})
}
// 查询登录用户详情
const getLoginUser = params => {
  return Axios.http({url: API + '/user/getLoginUser', data: params})
}
// 用户接口：判断手机号是否注册，返回值true代表已注册
const getPhoneNumberRegistered = params => {
  return Axios.http({url: API + '/user/getPhoneNumberRegistered', data: params})
}
// 用户接口：修改登录密码
const modifyPassword = params => {
  return Axios.http({url: API + '/user/modifyPassword', data: params, method: 'POST'})
}
// 用户接口：手机号注册
const phoneRegister = params => {
  return Axios.http({url: API + '/user/phoneRegister', data: params, method: 'POST'})
}
// 用户接口：重置密码
const resetPassword = params => {
  return Axios.http({url: API + '/user/resetPassword', data: params, method: 'POST'})
}
// 用户接口：用户设置登录密码
const setPassword = params => {
  return Axios.http({url: API + '/user/setPassword', data: params, method: 'POST'})
}

module.exports = {
  applyMemberServiceOrder,
  getUserServiceState,
  getLoginUser,
  getPhoneNumberRegistered,
  modifyPassword,
  phoneRegister,
  resetPassword,
  setPassword,
}